home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 2: CDPD 1 / Almathera Ten on Ten - Disc 2: CDPD 1.iso / pd / 176-200 / 183 / mklib / mklib.h < prev    next >
C/C++ Source or Header  |  1995-03-13  |  2KB  |  67 lines

  1. /*
  2.     Mklib 1.0 - a source file generator for Amiga shared libraries
  3.     Compiled with Manx v3.6a small code model/16 bit int. (see makefile)
  4.  
  5.     copyright 1988 Edwin Hoogerbeets
  6.  
  7.     This software and the files it produces are freely redistributable
  8.     as long there is no charge beyond reasonable copy fees and as long
  9.     as this notice stays intact.
  10.  
  11.     Thanks to Jimm Mackraz for Elib on Fish 87, from which much of this
  12.     program is lifted. Also thanks to Neil Katin for his mylib.asm upon
  13.     which elib is based.
  14. */
  15. #define MAXFUNC 50
  16. #define MAXLEN  64
  17.  
  18. /* definitions of token types */
  19. #define NOTHING 0       /* end of input     */
  20. #define IDENT   1       /* identifier       */
  21. #define OBRACE  2       /* open brace {     */
  22. #define CBRACE  3       /* close brace }    */
  23. #define LONGT   4       /* 'LONG' keyword   */
  24. #define OBRACK  5       /* open bracket (   */
  25. #define CBRACK  6       /* close bracket )  */
  26. #define COMMA   7       /* comma ,          */
  27. #define EXT     8       /* 'extern' keyword */
  28. #define SEMI    9       /* semicolon ;      */
  29. #define CHAR    10      /* 'char' keyword   */
  30. #define MYNAME  11      /* 'myname' token   */
  31. #define STAR    12      /* * is born yuk yuk*/
  32. #define QUOTE   13      /* quote "          */
  33. #define MYID    14      /* 'myid' keyword   */
  34. #define OTHER   20      /* everything else  */
  35.  
  36. char myname[MAXLEN];    /* storage for final name of library */
  37. int mynamedef = 0;      /* is myname defined? */
  38. char myid[MAXLEN];      /* storage for final id of library */
  39. int myiddef = 0;        /* is myid defined ? */
  40.  
  41. typedef struct {        /* structure to hold function names */
  42.     char name[MAXLEN];
  43.     int numofargs;
  44. } ftable;
  45.  
  46. ftable functable[MAXFUNC];
  47. int ftcounter = 0;
  48.  
  49. char tempfunc[MAXLEN];
  50. int tempc = 0;
  51.  
  52. FILE *startup, *interface, *link, *romtag, *makefile, *lib, *inc, *linkh;
  53.  
  54. void shutdown();
  55.  
  56. extern char *asmheader[], *cheader[], *makeheader[], *startupcode[];
  57. extern char *rtag[], *mandatory[], *incbody[], *faceheader[], *linkhead[];
  58. extern char *link2[], *face2[], *makefooter[], *facemid[];
  59.  
  60. #define NUMOFREGS 14
  61.  
  62. char *regs[] = {
  63.     "d0", "d1", "a0", "a1", "d2", "d3", "d4", "d5",
  64.     "d6", "d7", "a2", "a3", "a4", "a5", NULL
  65. };
  66.  
  67.